#include "../header.h"
int main(int argc,char const*argv[])
{
    //1、time的用法
    time_t tm1 = 0;
    time_t tm2 = time(&tm1);
    printf("tm1:%ld tm2: %ld\n", tm1, tm2);
    //2、gmtime的用法
    struct tm *timp = gmtime(&tm1);
    printf("tm1:%d-%d-%d %d:%d:%d\n", timp->tm_year + 1900
                                    , timp->tm_mon + 1
                                    , timp->tm_mday
                                    , timp->tm_hour 
                                    , timp->tm_min
                                    , timp->tm_sec);
    //3、asctime  欧洲标准时间                                    
    char *tims = asctime(timp);
    printf("tims:%s\n", tims);

    //4 当地时间
    printf("当地时间是:%s\n",asctime(localtime(&tm2)));

    //5、ctime
    printf("ctime:%s\n", ctime(&tm2));
    //6、mktime
    
    return 0;
}